package com.kaiwukj.android.ufamily.mvp.ui.page.home.message.add;

import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kaiwukj.android.ufamily.R;

import org.jetbrains.annotations.NotNull;

public class MessageChatSearchAdapter extends BaseMultiItemQuickAdapter<MessageChatSearchEntity, BaseViewHolder> {

    public MessageChatSearchAdapter() {
        addItemType(MessageChatSearchEntity.PERSON, R.layout.item_chat_search_result);
        addItemType(MessageChatSearchEntity.GROUP, R.layout.item_chat_search_person_result);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, MessageChatSearchEntity messageChatSearchEntity) {
        TextView tvTitle = holder.getView(R.id.tv_title);
        RecyclerView rvList = holder.getView(R.id.rv_person);
        if (holder.getItemViewType() == MessageChatSearchEntity.PERSON) {
            tvTitle.setText("查找的人");
        } else {
            tvTitle.setText("查找的话题");
        }
    }
}
